package com.btw;

import android.app.Activity;
import android.content.Intent;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.view.KeyEvent;

public class VSActivity extends Activity {
    /** Called when the activity is first created. */
	private GLSurfaceView mGLView;
	private Thread updater;
	
	public static final float CLICK_TOLERANCE = 20.0f;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        //Intent i = getIntent();
		mGLView = new VSView(this);
		
        setContentView(mGLView);
        
        updater = (new Thread((VSView)mGLView));
        updater.start();
    }
    
    @Override
	protected void onPause() {
		super.onPause();
		mGLView.onPause();
	}
	
	protected void onResume() {
		super.onResume();
		mGLView.onResume();
	}	
	
	public boolean onKeyDown(int keyCode, KeyEvent event) {
	     if (keyCode == KeyEvent.KEYCODE_BACK) {
		     //preventing accidental back button press
	    	 //if (gameIsOver) {
	    	//	 finish();
	    	 //}
		     return true;
	     }
	     return super.onKeyDown(keyCode, event);    
	}
	
}